import {HomeComponent} from './home/home.component';
import {AppComponent} from './app.component';
import {HeaderComponent} from './header/header.component';
import {NgModule, Component} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {MainCheckitemComponent} from './main-checkitem/main-checkitem.component';
import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
import {DemoComponent} from './demo/demo.component';

const routes: Routes = [
  {path: '', redirectTo: '/home/checkitem.html', pathMatch: 'full'},
  {
    path: 'home', component: HomeComponent, children: [
      {path: 'checkitem.html', component: MainCheckitemComponent},
    ]
  },
  {path: 'header', component: HeaderComponent},
  {path: 'demo', component: DemoComponent},
  {path: '**', component: PageNotFoundComponent}
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule {
}
